home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / library / rqtlsusr.lha / ReqTools / RexxReqTools / Examples / TTXARexx.lha / IncludeFile.ttx < prev    next >
Text File  |  1993-10-21  |  782b  |  43 lines

  1. /* $VER: IncludeFile.ttx 1.0 (19.02.93) */
  2.  
  3. OPTIONS RESULTS
  4. GetFileInfo
  5. PARSE VAR RESULT Lines .
  6.  
  7. FileName = rtFileRequest( "", "", "Select file to include", "_Include", "RT_PubScrName=TURBOTEXT RTFI_Flags=FREQF_PatGad" )
  8.  
  9. IF rtResult = 1 THEN DO
  10.   SetDisplayLock ON
  11.  
  12.   IF Lines = 1 THEN DO
  13.     InsertLine  /* Or else the include will be erased again.. :) */
  14.     MoveUp
  15.   END
  16.  
  17.   /* Save current contents of clipboard to the end of the file */
  18.   SetBookmark 0
  19.   MoveEOF
  20.   SetBookmark 191
  21.   PasteClip
  22.   MoveBookmark 0
  23.  
  24.   OpenClip FileName
  25.  
  26.   IF RC=0 THEN DO
  27.     PasteClip
  28.   END
  29.  
  30.   /* Restore the previous contents of the clipboard */
  31.   SetBookMark 0
  32.   MoveBookmark 191
  33.   ClearBookmark 191
  34.   MarkBlk
  35.   MoveEOF
  36.   CutBlk
  37.   MoveBookMark 0
  38.  
  39.   SetDisplayLock OFF
  40. END
  41.  
  42. CALL rtFreeFileBuffer
  43.